/*
{
"状态":1,
"名称":"获取-季节信息",
"作者":"陈泽椿",
"创建时间":"2018-06-30",
"功能":"获取-季节信息",
"log": [
	{"date":"06-01" , "dev" :"hzhh" , "content" : ""}
]
}
*/
declare @sql varchar(max)
declare @season varchar(100)
declare @where varchar(max)
set @season = '{season_name}'
set @where = ''

if (@season <>'')
begin
	set @where += ' and (season_name like ''%'+@season+'%'' or season_code like ''%'+@season+'%'')'
end
set @sql = '
select season_id,season_code,season_name,remarks,convert(varchar(20),create_time,120)create_time,create_user,
convert(varchar(20),update_time,120)update_time,update_user from b_season where 1=1 {where} '
set @sql =replace(@sql,'{where}',@where)

exec(@sql)
